var Plastic = {};
Plastic.between = function(str, left, right){
    if(str == null){
        return null;
    }
    if(str == ""){
        return "";
    }
    if(str.length == 1){
        return str;
    }
    if(left == null){
        return str;
    }
    if(right == null){
        return str;
    }
    if(left == ""){
        return str;
    }
    if(right == ""){
        return str;
    }
    return str.substring(str.indexOf(left) +left.length, str.lastIndexOf(right));
}
Plastic.yesNo = function(code){
    if(code == 0) {
        return "否";
    } else if(code == 1) {
        return "是";
    } else {
        return "";
    }
}
Plastic.openClose = function(code){
    if(code == 0) {
        return "关闭";
    } else if(code == 1) {
        return "开启";
    } else {
        return "";
    }
}
Plastic.enableDisable = function(code){
    if(code == 0) {
        return "禁用";
    } else if(code == 1) {
        return "启用";
    } else {
        return "";
    }
}
Plastic.version = function(code){
    return "v1.0.8";
}
module.exports = Plastic;
